package hotel.callback.oversea.service;

import hotel.base.oversea.utils.Result;
import hotel.base.oversea.vo.meituan.request.goods.MtHotelGoodsStatusDetailVo;
import hotel.base.oversea.vo.meituan.response.goods.MtHotelGoodsPriceBaseDetailVo;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 *  美团酒店产品业务接口(在售产品房型信息)
 */
@Service
public interface MtHotelGoodsService {
    Result<Object> getDaysCommonBaseSetForCallbackRole(Integer hotelId);

    public Integer getDaysCommonBaseSetForVip();
    public Integer getDaysCommonBaseSetForNormal();

    public Result<Object> checkMtStatusResultData(String response);
    //Integer getDaysCommonBaseSet();
    Result<Object> getMtHotelGoodsInventoryNotSaveLog(int goodsId, int roomId, String startDate, String endDate);
    /**
     * 根据入住时间和离店时间 查询产品数据
     * @param  hotelIds 根据酒店ids获取数据并保存
     * @return vo
     */
    Result<Object> getMtHotelGoods(List<Long> hotelIds, String checkinDate, String checkoutDate, int goodsType);

    Result<Object> getMtHotelGoodsPriceNotSave(List<Long> hotelIdList, List<Long> goodsIdList, String startDate, String endDate);


    /**
     * 保存商品状态
     */
    void saveGoodsStatus(List<MtHotelGoodsStatusDetailVo> goodsList, String hotelId);

    /**
     * 保存一组产品价格
     */
    void saveGoodsPriceInfos(List<MtHotelGoodsPriceBaseDetailVo> priceList, String hotelId, String goodsId);

    /**
     * 酒店所有产品房态信息(根据酒店时间等查询)
     * 查询2020-05-20 到 2020-05-24
     * 返回多个产品每个产品三条数据，每个产品三条数据的依据是查询时间，2020-05-20 2020-05-21 2020-05-23
     * 包含起始时间，不包含结束时间
     * @param
     * @return vo
     */
    Result<Object> getMtHotelGoodsStatus(Long hotelId, String checkinDate, String checkoutDate, int goodstype, String source);

    /**
     * 校验美团产品是否发送改变
     * @param goodsId
     * @param price
     * @return
     */
    Boolean checkMtGoodsChange(String today, String nowHourStr, String yestoday, String hotelId, Integer goodsId, String date, Integer price, String source, String apiType, Result rpInfo, String thisTimetampApi);

    //Integer getDaysCommonBaseSetForCallback(Integer hotelId);

    Boolean dealPrice(Long days, Integer tj, Integer pushSalePrice, Integer subPrice, String redisKeyExpiDays, Integer apiSalePrice,
                      String thisHotelId, Integer goodsId, String date, String room_price, Integer changeToLibraryPrice, Integer has, Integer libraryPriceBefore, String thisTimestampApi, Integer fromJob);

    Map<String, String> findUpDateMap(Integer thisHotelId, String nowHourStr);
}
